<script setup lang="ts">
import { useRouter } from "vue-router";
import {fallback} from "@/api/funcTion";
const router = useRouter();
// console.log(router.currentRoute.value.meta.type);
</script>

<template>
<div class='box'>
    <van-icon  name="arrow-left" size="20" @click="fallback(router)" class="back" v-if="router.currentRoute.value.meta.type!=true"/>
    <header class="header">
        <slot></slot>
    <div class="icon">
        <van-icon name="weapp-nav" style="margin-right: 5px;border-right: 1px solid #e2e2e2;padding:0 6px"/>
        <van-icon name="stop-circle-o" style="padding-right: 4px"/>
    </div>
    </header>
</div>
</template>

<style scoped>
.box{
    display: flex;
    background-color: white;
    align-items: center;
    width: 100%;
    //border-bottom: 1px solid lightgray;
}
header{
    width: 100%;
    padding: 5px 0;
    padding-left: 70px;
    text-align: center;
    font-weight: 600;
    font-size: 15px;
    background-color: white;
}
.icon{
    float: right;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    height: 25px;
    width: 70px;
    border:1px solid #e2e2e2;
    border-radius: 30px;
}
.back:hover{
    cursor: pointer;
}

</style>